Optimal. Leaf size=97 \[ \frac {a b \sec ^6(c+d x)}{3 d}+\frac {a^2 \tan (c+d x)}{d}+\frac {\left (2 a^2+b^2\right ) \tan ^3(c+d x)}{3 d}+\frac {\left (a^2+2 b^2\right ) \tan ^5(c+d x)}{5 d}+\frac {b^2 \tan ^7(c+d x)}{7 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 97, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3587, 710,
1824} \begin {gather*} \frac {\left (a^2+2 b^2\right ) \tan ^5(c+d x)}{5 d}+\frac {\left (2 a^2+b^2\right ) \tan ^3(c+d x)}{3 d}+\frac {a^2 \tan (c+d x)}{d}+\frac {a b \sec ^6(c+d x)}{3 d}+\frac {b^2 \tan ^7(c+d x)}{7 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 710
Rule 1824
Rule 3587
Rubi steps
\begin {align*} \int \sec ^6(c+d x) (a+b \tan (c+d x))^2 \, dx &=\frac {\text {Subst}\left (\int (a+x)^2 \left (1+\frac {x^2}{b^2}\right )^2 \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=\frac {a b \sec ^6(c+d x)}{3 d}+\frac {\text {Subst}\left (\int \left (1+\frac {x^2}{b^2}\right )^2 \left (-2 a x+(a+x)^2\right ) \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=\frac {a b \sec ^6(c+d x)}{3 d}+\frac {\text {Subst}\left (\int \left (a^2+\frac {\left (2 a^2+b^2\right ) x^2}{b^2}+\frac {\left (a^2+2 b^2\right ) x^4}{b^4}+\frac {x^6}{b^4}\right ) \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=\frac {a b \sec ^6(c+d x)}{3 d}+\frac {a^2 \tan (c+d x)}{d}+\frac {\left (2 a^2+b^2\right ) \tan ^3(c+d x)}{3 d}+\frac {\left (a^2+2 b^2\right ) \tan ^5(c+d x)}{5 d}+\frac {b^2 \tan ^7(c+d x)}{7 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.73, size = 104, normalized size = 1.07 \begin {gather*} \frac {\tan (c+d x) \left (105 a^2+105 a b \tan (c+d x)+35 \left (2 a^2+b^2\right ) \tan ^2(c+d x)+105 a b \tan ^3(c+d x)+21 \left (a^2+2 b^2\right ) \tan ^4(c+d x)+35 a b \tan ^5(c+d x)+15 b^2 \tan ^6(c+d x)\right )}{105 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.22, size = 110, normalized size = 1.13
method | result | size |
derivativedivides | \(\frac {-a^{2} \left (-\frac {8}{15}-\frac {\left (\sec ^{4}\left (d x +c \right )\right )}{5}-\frac {4 \left (\sec ^{2}\left (d x +c \right )\right )}{15}\right ) \tan \left (d x +c \right )+\frac {a b}{3 \cos \left (d x +c \right )^{6}}+b^{2} \left (\frac {\sin ^{3}\left (d x +c \right )}{7 \cos \left (d x +c \right )^{7}}+\frac {4 \left (\sin ^{3}\left (d x +c \right )\right )}{35 \cos \left (d x +c \right )^{5}}+\frac {8 \left (\sin ^{3}\left (d x +c \right )\right )}{105 \cos \left (d x +c \right )^{3}}\right )}{d}\) | \(110\) |
default | \(\frac {-a^{2} \left (-\frac {8}{15}-\frac {\left (\sec ^{4}\left (d x +c \right )\right )}{5}-\frac {4 \left (\sec ^{2}\left (d x +c \right )\right )}{15}\right ) \tan \left (d x +c \right )+\frac {a b}{3 \cos \left (d x +c \right )^{6}}+b^{2} \left (\frac {\sin ^{3}\left (d x +c \right )}{7 \cos \left (d x +c \right )^{7}}+\frac {4 \left (\sin ^{3}\left (d x +c \right )\right )}{35 \cos \left (d x +c \right )^{5}}+\frac {8 \left (\sin ^{3}\left (d x +c \right )\right )}{105 \cos \left (d x +c \right )^{3}}\right )}{d}\) | \(110\) |
risch | \(\frac {16 i \left (-140 i a b \,{\mathrm e}^{8 i \left (d x +c \right )}+70 a^{2} {\mathrm e}^{8 i \left (d x +c \right )}-70 b^{2} {\mathrm e}^{8 i \left (d x +c \right )}-140 i a b \,{\mathrm e}^{6 i \left (d x +c \right )}+175 a^{2} {\mathrm e}^{6 i \left (d x +c \right )}+35 b^{2} {\mathrm e}^{6 i \left (d x +c \right )}+147 a^{2} {\mathrm e}^{4 i \left (d x +c \right )}-21 b^{2} {\mathrm e}^{4 i \left (d x +c \right )}+49 a^{2} {\mathrm e}^{2 i \left (d x +c \right )}-7 b^{2} {\mathrm e}^{2 i \left (d x +c \right )}+7 a^{2}-b^{2}\right )}{105 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{7}}\) | \(171\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.26, size = 104, normalized size = 1.07 \begin {gather*} \frac {15 \, b^{2} \tan \left (d x + c\right )^{7} + 35 \, a b \tan \left (d x + c\right )^{6} + 105 \, a b \tan \left (d x + c\right )^{4} + 21 \, {\left (a^{2} + 2 \, b^{2}\right )} \tan \left (d x + c\right )^{5} + 105 \, a b \tan \left (d x + c\right )^{2} + 35 \, {\left (2 \, a^{2} + b^{2}\right )} \tan \left (d x + c\right )^{3} + 105 \, a^{2} \tan \left (d x + c\right )}{105 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.38, size = 100, normalized size = 1.03 \begin {gather*} \frac {35 \, a b \cos \left (d x + c\right ) + {\left (8 \, {\left (7 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{6} + 4 \, {\left (7 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{4} + 3 \, {\left (7 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + 15 \, b^{2}\right )} \sin \left (d x + c\right )}{105 \, d \cos \left (d x + c\right )^{7}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \tan {\left (c + d x \right )}\right )^{2} \sec ^{6}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.66, size = 118, normalized size = 1.22 \begin {gather*} \frac {15 \, b^{2} \tan \left (d x + c\right )^{7} + 35 \, a b \tan \left (d x + c\right )^{6} + 21 \, a^{2} \tan \left (d x + c\right )^{5} + 42 \, b^{2} \tan \left (d x + c\right )^{5} + 105 \, a b \tan \left (d x + c\right )^{4} + 70 \, a^{2} \tan \left (d x + c\right )^{3} + 35 \, b^{2} \tan \left (d x + c\right )^{3} + 105 \, a b \tan \left (d x + c\right )^{2} + 105 \, a^{2} \tan \left (d x + c\right )}{105 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.57, size = 102, normalized size = 1.05 \begin {gather*} \frac {a^2\,\mathrm {tan}\left (c+d\,x\right )+{\mathrm {tan}\left (c+d\,x\right )}^3\,\left (\frac {2\,a^2}{3}+\frac {b^2}{3}\right )+{\mathrm {tan}\left (c+d\,x\right )}^5\,\left (\frac {a^2}{5}+\frac {2\,b^2}{5}\right )+\frac {b^2\,{\mathrm {tan}\left (c+d\,x\right )}^7}{7}+a\,b\,{\mathrm {tan}\left (c+d\,x\right )}^2+a\,b\,{\mathrm {tan}\left (c+d\,x\right )}^4+\frac {a\,b\,{\mathrm {tan}\left (c+d\,x\right )}^6}{3}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________